// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'Id',
        footer: "Foots",
        cnName: '仓库建模',
        name: 'warehousemodelling',
        url: "/warehousemodelling/",
        sortName: "Id",
        // 确保分页功能启用
        paginationHide: false
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"WarehouseNumber":"","WarehouseName":"","WarehousePosition":"","WarehouseArea":"","WarehousePersonincharge":"","WarehouseNote":""};
    const editFormOptions = [[{"title":"仓库编号","field":"WarehouseNumber","type":"text"},
                               {"title":"仓库名称","field":"WarehouseName","type":"text"}],
                              [{"dataKey":"city","data":[],"title":"位置","field":"WarehousePosition","type":"text"},
                               {"title":"面积（m3）","field":"WarehouseArea","type":"text"}],
                              [{"title":"负责人","field":"WarehousePersonincharge","type":"text"},
                               {"title":"备注","field":"WarehouseNote","type":"text"}]];
    const searchFormFields = {"WarehouseNumber":"","WarehouseName":"","WarehousePosition":"","WarehouseArea":"","WarehousePersonincharge":"","WarehouseNote":""};
    const searchFormOptions = [[{"title":"仓库编号","field":"WarehouseNumber","type":"like"},{"title":"仓库名称","field":"WarehouseName","type":"like"},{"dataKey":"city","data":[],"title":"位置","field":"WarehousePosition","type":"like"}],[{"title":"面积（m3）","field":"WarehouseArea","type":"="},{"title":"负责人","field":"WarehousePersonincharge","type":"like"},{"title":"备注","field":"WarehouseNote","type":"like"}]];
    const columns = [{field:'Id',title:'主键自增',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'WarehouseNumber',title:'仓库编号',type:'string',link:true,width:220,align:'left',sort:true},
                       {field:'WarehouseName',title:'仓库名称',type:'string',width:220,align:'left'},
                       {field:'WarehousePosition',title:'位置',type:'string',bind:{ key:'city',data:[]},width:220,align:'left'},
                       {field:'WarehouseArea',title:'面积（m3）',type:'int',width:110,align:'left'},
                       {field:'WarehousePersonincharge',title:'负责人',type:'string',width:220,align:'left'},
                       {field:'WarehouseNote',title:'备注',type:'string',width:220,align:'left'},
                       {field:'IsDel',title:'删除字段',type:'int',width:110,hidden:true,require:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];
    
    // 分页配置
    const pagination = {
        sizes: [10, 20, 30, 50, 100], // 分页条大小选项
        size: 20, // 默认分页大小(每页显示数量)
        sortName: "Id", // 排序字段
        order: 'desc' // 排序方式desc或者asc
    };

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details,
        pagination,
        paginationHide: false // 确保分页不被隐藏
    };
}